package bean;

import java.sql.ResultSet;
import java.sql.SQLException;

import common.RowMapper;

public class GoodsRowMapper implements RowMapper<Goods> {

	@Override
	public Goods mapper(ResultSet rs) throws SQLException {
		Goods goods=new Goods();
		goods.setGoodsid(rs.getInt("goodsid"));
		goods.setName(rs.getString("goods_name"));
		goods.setThirdCategoryid(rs.getInt("third_categoryid"));
		goods.setPrice(rs.getDouble("price"));
		goods.setCost(rs.getDouble("cost"));
		goods.setCount(rs.getInt("count"));
		goods.setIfonsale(rs.getInt("ifonsale"));
		goods.setDiscountPrice(rs.getDouble("discount_price"));
		goods.setDiscountMsg(rs.getString("discount_msg"));
		goods.setPostFee(rs.getDouble("post_fee"));
		goods.setDescribe(rs.getString("describe"));
		goods.setIfexist(rs.getInt("ifexist"));
		return goods;
	}
}
